<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tld/sxh.tld" prefix="sxh"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title>无标题文档</title>
		<script>
	function delCustomer() {
		if (window.confirm("确认删除客户信息?")) {
			alert('删除成功!');
			return true;
		} else {
			return false;
		}
	}
</script>

		<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/pageCommon.js"></script>
		<link rel="stylesheet"
			href="${pageContext.request.contextPath}/style/pageCommon.css"
			type="text/css"></link>
	</head>

	<body>
		<form
			action="${pageContext.request.contextPath}/Customer_getAllCustomer.action"
			method="post">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="30"
						background="${pageContext.request.contextPath}/images/tab_05.gif">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="12" height="30">
									<img src="${pageContext.request.contextPath}/images/tab_03.gif"
										width="12" height="30" />
								</td>
								<td>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="46%" valign="middle">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="5%">
															<div align="center">
																<img
																	src="${pageContext.request.contextPath}/images/tb.gif"
																	width="16" height="16" />
															</div>
														</td>
														<td width="95%" class="STYLE1">
															<span class="STYLE3">你当前的位置</span>：[客户信息管理]
														</td>
													</tr>
												</table>
											</td>
											<td width="54%">
												<table border="0" align="right" cellpadding="0"
													cellspacing="0">
													<tr>
														<td width="60">
															<table width="90%" border="0" cellpadding="0"
																cellspacing="0">
																<tr>
																	<td class="STYLE1">
																		<div align="center">
																			<img
																				src="${pageContext.request.contextPath}/images/33.gif"
																				width="14" height="14" />
																		</div>
																	</td>
																	<td class="STYLE1">
																		<div align="center">
																			<input type="submit" value="查询"
																				style="border: 0px; background-image: url('${pageContext.request.contextPath}/images/btnbg.gif')" />
																		</div>
																	</td>
																</tr>
															</table>
														</td>
														<td width="52">
															<table width="88%" border="0" cellpadding="0"
																cellspacing="0">
																<tr>
																	<td class="STYLE1">
																		<div align="center">
																			<img
																				src="${pageContext.request.contextPath}/images/11.gif"
																				width="14" height="14" />
																		</div>
																	</td>
																	<td class="STYLE1">
																		<div align="center">
																			帮助
																		</div>
																	</td>
																</tr>
															</table>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
								<td width="16">
									<img src="${pageContext.request.contextPath}/images/tab_07.gif"
										width="16" height="30" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_12.gif">
									&nbsp;
								</td>
								<td>
									<table width="100%" border="0" cellpadding="0" cellspacing="1"
										bgcolor="b5d6e6" onmouseover=
	changeto();
onmouseout=
	changeback();
>
										<tr>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户编号</span>
												</div>
											</td>
											<td width="3%" height="22" bgcolor="#FFFFFF">
												<input type="text" name="cust.custNo"
													style="background-color: #FFFFFF" />
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户名称</span>
												</div>
											</td>
											<td width="3%" height="22" bgcolor="#FFFFFF">
												<input type="text" name="cust.custName"
													style="background-color: #FFFFFF" />
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">地区</span>
												</div>
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<select name="cust.custRegion">
													<option value="全部">
														全部
													</option>
													<c:forEach var="address" items="${requestScope.addressList}">
														<option value="${address.dictItem}">
														${address.dictItem}
														</option>
													</c:forEach>
												</select>
											</td>
										</tr>
									</table>
								</td>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_15.gif">
									&nbsp;
								</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_12.gif">
									&nbsp;
								</td>
								<td>
									<table width="100%" border="0" cellpadding="0" cellspacing="1"
										bgcolor="b5d6e6" onmouseover=
	changeto();
onmouseout=
	changeback();
>
										<tr>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户经理</span>
												</div>
											</td>
											<td width="3%" height="22" bgcolor="#FFFFFF">
												<input type="text" name="cust.custManagerName"
													style="background-color: #FFFFFF" />
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户等级</span>
												</div>
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<select name="cust.custLevelLabel">
													<option value="全部">
														全部
													</option>
													<c:forEach var="grade" items="${requestScope.custGradeList}">
														<option value="${grade.dictItem}">
															${grade.dictItem}
														</option>
													</c:forEach>
												</select>
											</td>
											<td width="24%" height="22" bgcolor="#FFFFFF" colspan="2">
											</td>
										</tr>
									</table>
								</td>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_15.gif">
									&nbsp;
								</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_12.gif">
									&nbsp;
								</td>
								<td>
									<table width="100%" border="0" cellpadding="0" cellspacing="1"
										bgcolor="b5d6e6" onmouseover=
	changeto();
onmouseout=
	changeback();
>
										<tr>
											<td width="9%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">序号</span>
												</div>
											</td>
											<td width="12%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户编号</span>
												</div>
											</td>
											<td width="20%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户名称</span>
												</div>
											</td>
											<td width="7%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">地区</span>
												</div>
											</td>
											<td width="10%" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户经理</span>
												</div>
											</td>
											<td width="15%" height="22" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">客户等级</span>
												</div>
											</td>
											<td width="18%" height="22" bgcolor="#FFFFFF" class="STYLE1">
												<div align="center">
													基本操作
												</div>
											</td>
										</tr>

										<c:forEach var="cust" items="${requestScope.customerList}">
											<tr>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center" class="STYLE1">
														<div align="center">
															${cust.custId}
														</div>
													</div>
												</td>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE1">${cust.custNo}</span>
													</div>
												</td>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE1">${cust.custName}</span>
													</div>
												</td>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE1">${cust.custRegion} </span>
													</div>
												</td>
												<td bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE1">${cust.custManagerName}</span>
													</div>
												</td>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE1">${cust.custLevelLabel}</span>
													</div>
												</td>
												<td height="20" bgcolor="#FFFFFF">
													<div align="center">
														<span class="STYLE4"><a
															href="${pageContext.request.contextPath}/Customer_findCustBycustId.action?custId=${cust.custId}">&nbsp;
															<img
																src="${pageContext.request.contextPath}/images/edt.gif"
																width="16" height="16" title="编辑" /></a><a
															href="${pageContext.request.contextPath}/Customer_findAllLinkman.action?custId=${cust.custId}">&nbsp;
															<img
																src="${pageContext.request.contextPath}/images/bt_linkman.gif"
																width="16" height="16" title="联系人" /></a><a
															href="${pageContext.request.contextPath}/Customer_getAllActivityByCustId.action?custId=${cust.custId}">&nbsp;
															<img
																src="${pageContext.request.contextPath}/images/bt_acti.gif"
																width="16" height="16" title="交往记录" /></a><a
															href="${pageContext.request.contextPath}/Customer_findCustBycustNo.action?custNo=${cust.custNo}">&nbsp;
															<img
																src="${pageContext.request.contextPath}/images/bt_orders.gif"
																width="16" height="16" title="历史订单" /></a><a
															href="${pageContext.request.contextPath}/Customer_delCustomerById.action?custId=${cust.custId}" onclick="return delCustomer()">&nbsp;
															<img
																src="${pageContext.request.contextPath}/images/del.gif"
																width="16" height="16" title="删除" /></a>
															</span>
													</div>
												</td>
											</tr>
										</c:forEach>
									</table>
								</td>
								<td width="8"
									background="${pageContext.request.contextPath}/images/tab_15.gif">
									&nbsp;
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="35"
						background="${pageContext.request.contextPath}/images/tab_19.gif">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="12" height="35">
									<img src="${pageContext.request.contextPath}/images/tab_18.gif"
										width="12" height="35" />
								</td>
								<td>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td class="STYLE4" colspan="2">
												<sxh:pageSearchTag requestPath="/Customer_getAllCustomer.action?" pageInfo="${requestScope.pageInfo}">
													<jsp:include page="../../jsp/pageSearchCommon.jsp"></jsp:include>
												</sxh:pageSearchTag>
											</td>
										</tr>
									</table>
								</td>
								<td width="16">
									<img src="${pageContext.request.contextPath}/images/tab_20.gif"
										width="16" height="35" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>